const MenuObj = require('../modules/Menu');

let MenuController = {
    get_menuInfo: async function(req, res){
        let resultDate = await MenuObj.getMenuInfo();
        res.send(resultDate);
    },

    post_menuAdd: async function(req, res){
        let data = req.body;
        let resultDate = await MenuObj.addMenu(data);
        res.send(resultDate);
    },

    post_menuEdit: async function(req, res){
        let data = req.body;
        let resultDate = await MenuObj.editMenu(data);
        res.send(resultDate);
    },

    post_menuDel: async function(req, res){
        let data = req.body;
        let resultDate = await MenuObj.delMenu(data);
        res.send(resultDate);
    }
}
module.exports = MenuController;